package com.bible.test.pad.activity;

import com.bible.fire.R;
import com.bible.fire.pad.activity.BaseActivity;
import com.bible.test.pad.activity.fragment.BriefImageActivity;

import android.app.Activity;
import android.app.ActivityGroup;
import android.app.LocalActivityManager;
import android.app.TabActivity;
import android.content.Intent;
import android.os.Bundle;
import android.widget.TabHost;
import android.widget.TabHost.OnTabChangeListener;
import android.widget.TabHost.TabSpec;

@SuppressWarnings("deprecation")
public class TabDemoActivity extends TabActivity {
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		
		super.onCreate(savedInstanceState);
		this.setContentView(R.layout.activity_tabdemo);
		//TabHost tabhost = (TabHost)findViewById(R.id.tabhost);
		TabHost tabhost = this.getTabHost();
		//tabhost.setup();
		TabSpec spec;
		Intent intent;
		//第一个tab
		spec = tabhost.newTabSpec("tab_1");
		spec.setIndicator("缩略图");
		intent = new Intent(this, BriefImageActivity.class );
		spec.setContent(intent);
		tabhost.addTab( spec );
		//第二个tab
		spec = tabhost.newTabSpec("tab_2");
		spec.setIndicator("时钟");		
		spec.setContent(R.id.widget_layout_tab2);
		tabhost.addTab( spec );
		//第三个tab
		spec = tabhost.newTabSpec("tab_3");
		spec.setIndicator("Radio分组");		
		spec.setContent(R.id.widget_layout_tab3);
		tabhost.addTab( spec );
		tabhost.setCurrentTab(0);
		
		tabhost.setOnTabChangedListener(new OnTabChangeListener(){
			@Override
			public void onTabChanged(String tabId) {				
				
			}			
		});
	}

}
